<?

if (!empty($_FILES)):
	require_once "qi/init.php";
	print_r($_FILES);
	$dir = dirname(__FILE__)."/teste";
	//Qi_Upload::salvar_em($dir);
	$file = Qi_Upload::salvar_em($dir, 123);
	$nome = $_FILES["arquivo"]["name"];
	//$file = "$dir/$nome";
	var_dump(file_exists($file));
	unlink($file);
endif;

?>
<html>
<body>
<form enctype="multipart/form-data" method="post">
<input type="file" name="arquivo" />
<input type="file" name="arquivo2" />
<input type="file" name="files[]" />
<input type="file" name="files[]" />
<input type="submit" value="Enviar" />
</form>
<pre>
<? print_r($_FILES) ?>
</pre>
</body>
</html>
<? flush(); sleep(5) ?>